package com.rj.gpdata.client;

import com.dtflys.forest.annotation.*;
import com.rj.gpdata.domain.query.QueryClistParam;
import com.rj.gpdata.domain.query.QueryGlbkParam;
import com.rj.gpdata.domain.query.QueryJJlbParam;
import com.rj.gpdata.domain.query.QueryParam;
import com.rj.gpdata.domain.res.bk.BkdataRes;

import java.util.Map;

/**
 *K线数据接口
 */
public interface ApiKlineClient {
    /**
     * 个股获取日数据
     *
     * @param param
     * @return
     */
    @Post("https://push2his.eastmoney.com/api/qt/stock/kline/get?_={timestamp}")
    //@HTTPProxy(host = "{proxyHost}", port = "{proxyPorts}")
    String getDayData(@Query QueryParam param,
                      @Query("timestamp") Long timestamp,
                      @Var("proxyHost")String proxyHost,
                      @Var("proxyPorts")String proxyPort

    );

    /**
     * 获取股票数据列表
     * @param param
     * @return
     */
    @Post("https://push2his.eastmoney.com/api/qt/clist/get")
    //@HTTPProxy(host = "{proxyHost}", port = "{proxyPorts}")
    String getClistData(@Query QueryClistParam param,@Var("proxyHost")String proxyHost,
                        @Var("proxyPorts")String proxyPort);
    /**
     * 查询基金数据
     *
      * @param param
     * @return
     */
    @Post("https://push2his.eastmoney.com/api/qt/clist/get?_={timestamp}")
    String getClistData(@Query QueryJJlbParam param, @Query("timestamp") Long timestamp);
    /**
     * 获取基金ETF成分数据
     *
      * @return
     */
    @Get("https://fundf10.eastmoney.com/FundArchivesDatas.aspx?type=jjcc&topline=20&year=&month=&rt=0.58736433067932")
    String FundArchivesDatas( @Query("code") String securityCode);
    /**
     * 所属行业板块
     * @param filter
     * @return
     */
    @Post("https://datacenter.eastmoney.com/securities/api/data/get")
    BkdataRes getGlbkData(@Query QueryGlbkParam filter);


}
